package dongshi.daddy.main;

import com.alibaba.dubbo.rpc.service.GenericService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ConsumerWithGenericServiceMain {
    public static final String SAY_HI = "sayHi";

    public static void main(String[] args) throws Exception {
        ClassPathXmlApplicationContext context
                = new ClassPathXmlApplicationContext("consumer-with-call-generic-interface.xml");
        context.start();
        GenericService genericService = (GenericService) context.getBean("genericService");
        Object o = genericService.$invoke(SAY_HI, new String[]{"java.lang.String"}, new String[]{"generic word"});
        System.out.println(o);
        System.in.read();
    }
}
